using System;
using System.Collections.Generic;
using System.IO;
using System.Text;

namespace Multiplicity.Reflection {
    class Program {
        static void Main(string[] args) {
            //string filePath = @"D:\dev\_Languages\jachymko.Compiler\jachymko.Compiler\bin\Debug\jachymko.Compiler.dll";
            //string filePath = @"D:\JaJa\Drop\JaJa.ManagedIsapi.Installer.exe";
            string filePath = @"D:\desktop\JaJa\Drop\JaJa.SharePoint.ItemSecurity.dll";
            
            Module asm = new Module(File.ReadAllBytes(filePath));

           // Section s = Section.Parse(new BinaryReader(new MemoryStream(Encoding.ASCII.GetBytes(new string('\0', 30)))));

            Console.WriteLine(filePath);
            Console.WriteLine(new string('=', filePath.Length));
            Console.WriteLine("Machine = {0}", asm.CoffHeader.Machine);
            Console.WriteLine("Timestamp = {0}", asm.CoffHeader.TimeDateStamp);


            Console.WriteLine("Streams:");
            foreach (StorageHeapHeader stream in asm.StorageHeader.Heaps) {
                Console.WriteLine(stream.Name);
            }

        }
    }




}
